package DBLayer;

import static org.junit.Assert.*;


import org.junit.Test;

import ModelLayer.Customer;

public class DBCustomerTest {

	@Test
public void testFindCostumer() {
		
		DBCustomer dbObj = new DBCustomer();
		Customer cuObj = dbObj.searchCustomerName("Kaj",false);
		if(cuObj !=null)
		{
			System.out.println("Customer fundet" + " " + cuObj.getName() + " " + cuObj.getCity());
		}
		else{
			fail("Costumer ikke fundet");
		}
		
	}
	
	@Test
	public void testInsertCustomer(){
//		insertCustomer(Customer cu)
		Customer cu = new Customer(999, "testname", "testAddress", 999, "testcity", 999);
		DBCustomer dbObj = new DBCustomer();
		try {
			dbObj.insertCustomer(cu);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}



}
